<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<meta charset="ISO-8859-1" />
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/bootstrap.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/bootstrap-responsive.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/flexslider.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/font-awesome.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/prettyPhoto.css" media="all" />
	<link rel="stylesheet" type="text/css" href="resources/css/red.css"
		media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/sidebar-nav.css" media="all" />
	<link rel="stylesheet" type="text/css" href="resources/css/style.css"
		media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/icon-css.css" media="all" />
	<link href="css/webwidget_menu_glide.css" rel="resources/stylesheet"
		type="text/css" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/nice-menu.css" media="all" />
	<link rel="stylesheet" href="resources/css/login-style.css"/>
</h:head>

<!-- Method kiem tra moi khi trang duoc load -->
<f:event listener="#{userLoginManagedBean.onLoad}" type="preRenderView"></f:event>

<h:body>
	<div class="login" style="margin-top: 10%">
      <h1>Đăng nhập</h1>
      <h:form method="post">
        <p><p:inputText placeholder="Tên tài khoản" value="#{userLoginManagedBean.username}"/></p>
        <p><p:password placeholder="Mật khẩu" value="#{userLoginManagedBean.password}"/></p>       
        <p class="submit" style="text-align: center;">
        	<h:commandButton value="Đăng nhập" style="margin-right: 10%;" action="#{userLoginManagedBean.login}"/>
        	<h:commandButton value="Đăng ký" action="DangKyThanhVien"/>
        </p>
      </h:form>
    </div>
    <div class="login-help">
      <p>Quên mật khẩu? <a href="./PasswordRecover.xhtml">Bấm vào đây!</a>.</p>
    </div>
</h:body>
</html>